package com.example.tbclientdemo.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;

@Mapper
public interface ElecMeterDataMapper {

    //select  _wstart, _wend, min(total_power) as minps ,max(total_power) as maxps,  spread(total_power) as diff FROM elec_meter_data where time > '2023-10-21 15:00:00.000' and time < '2023-11-25 08:00:00.000' interval(1d) FILL(LINEAR)

    @Insert("insert into elec_meter_data(time,device_name,total_power) values(#{time},#{deviceName},#{totalPower})")
    int insertElecMeterData(Date time, String deviceName, Double totalPower);

}
